package com.sjj.springcloud.service.Impl;

import com.sjj.springcloud.dao.DeptDao;
import com.sjj.springcloud.pojo.Dept;
import com.sjj.springcloud.service.DeptService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    @Resource
    private DeptDao deptDao;

    @Override
    public Dept get(Long id) {
        return deptDao.getDept(id);
    }

    @Override
    public List<Dept> getAll() {
        return deptDao.getAllDept();
    }

    @Override
    public boolean add(Dept dept) {
        return deptDao.addDept(dept);
    }
}
